package com.victor.modular.system.warpper;

import com.victor.common.constant.factory.ConstantFactory;
import com.victor.common.persistence.model.WeddingDress;
import com.victor.common.warpper.BaseControllerWarpper;
import com.victor.core.util.ToolUtil;

import java.util.List;
import java.util.Map;

/**
 * 观众管理的包装类
 *
 * @author jiabin.Zhao
 * @date 2017年2月13日 下午10:47:03
 */
public class CustomWarpper extends BaseControllerWarpper {

    public CustomWarpper(List<Map<String, Object>> list) {
        super(list);
    }

    @Override
    public void warpTheMap(Map<String, Object> map) {
        map.put("hunshaDressId", ToolUtil.isEmpty(map.get("hunsha_dress_id")) ? "":ConstantFactory.me().getWeddingDressName( (Integer) map.get("hunsha_dress_id"), WeddingDress.HUNSHA));
        map.put("xiuheDressId", ToolUtil.isEmpty(map.get("xiuhe_dress_id")) ? "":ConstantFactory.me().getWeddingDressName( (Integer)map.get("xiuhe_dress_id"), WeddingDress.XIUHE));
    }

}
